package 强化训练;

import java.util.Scanner;

public class day27猴子分桃 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int n = sc.nextInt();
            //总桃子数
            int num = (int) (Math.pow(5,n) - 4);
            //老猴子得到的桃子数
            int last = (int) (Math.pow(4,n) + n -4);
            System.out.println(num + " " + last );
        }
    }
}
